package com.loveprogrammer.dto.battle;

import com.loveprogrammer.dto.base.RequestBase;
import com.loveprogrammer.pojo.StringMessage;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @ClassName BattleFightContent
 * @Description 战斗结果
 * @Author admin
 * @Date 2024/2/22 10:37
 * @Version 1.0
 */
@Data
public class BattleFightResult extends RequestBase {

    public BattleFightResult() {
    }

    public BattleFightResult(StringMessage message) {
        super(message);
    }

    private boolean success = true;

    private boolean win = true;

    private List<String> fightLogs = new ArrayList<>();

    private List<Character> ourSide;

    private List<Character> otherSide;

    private String mapId;

    private List<MapChoose.MapItem> mapList;

    public void addConsole(String line) {
        fightLogs.add(line);
    }

    // TODO 等级提升 物品掉落 任务完成情况

    @Data
    public static class Character {

        private String name;                   // 角色信息模板
        private int strength;                  // 力量 影响物理输出 物理技能输出
        private int armature;                 // 护甲值 影响物理防御和法术防御
        private int constitution;               // 体质 影响生命值 一点体质增加10点生命值
        private int magic;                       // 魔力 影响法术输出 法术技能输出
        private int technique;                   // 技巧 影响闪避率、暴击率
        private int speed;                         // 攻击速度
        private int hpMax;                            // 最大生命值
        private int level;                           // 级别
        private int monsterQuality;           // 野怪的血统
        private String quality;                 // 野怪的品质

        public String simplePrint() {
            return "**** 名称：" + this.name + " " +
                    "级别" + this.level + " " +
                    "血量:" + this.hpMax + " " +
                    "护甲值:" + this.armature + " " +
                    "力量:" + this.strength + " " +
                    "法力:" + this.magic + " " +
                    "技巧:" + this.technique + " " +
                    "速度:" + this.speed + "****";
        }
    }

}
